-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
languages: add CEL, SpiceDB schema language #9296
Conversation
I seem to be getting the following error when I run
|
Are you running on aarch64? That may be #9294. You can apply the diff suggested in the Docs CI or revert the dep locally temporarily to fix the build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to add the queries to runtime/queries/cel/highlights.scm
and runtime/queries/spicedb/highlights.scm
. You can use the queries in the repos if they exist (queries/highlights.scm
) as guides or copy them if they already use the Helix captures (https://docs.helix-editor.com/master/themes.html#syntax-highlighting) - we don't automatically use the ones in the repos.
25cadc5
to
e683ce8
Compare
Thanks for the feedback! I am using an M1, so rebasing on master fixed my issue. I copied over the queries. I'd love a sanity check from someone better at tree-sitter because I'm not sure CEL is being properly injected into the |
Co-authored-by: Michael Davis <[email protected]>
Thanks very much for the feedback! I've commit your changes. What's a good way to test the injecting of CEL into the SpiceDB schema? |
You'll have to test the injection manually by finding a You can examine the syntax trees when you're in a SpiceDB file by selecting a block for example and using |
Thanks a ton! I've got it all working now! |
* languages: add CEL language and grammar * languages: add spicedb schema language * chore: docgen * runtime/queries: refine spicedb & cel highlights Co-authored-by: Michael Davis <[email protected]> * languages: update spicedb --------- Co-authored-by: Michael Davis <[email protected]>
* languages: add CEL language and grammar * languages: add spicedb schema language * chore: docgen * runtime/queries: refine spicedb & cel highlights Co-authored-by: Michael Davis <[email protected]> * languages: update spicedb --------- Co-authored-by: Michael Davis <[email protected]>
* languages: add CEL language and grammar * languages: add spicedb schema language * chore: docgen * runtime/queries: refine spicedb & cel highlights Co-authored-by: Michael Davis <[email protected]> * languages: update spicedb --------- Co-authored-by: Michael Davis <[email protected]>
* languages: add CEL language and grammar * languages: add spicedb schema language * chore: docgen * runtime/queries: refine spicedb & cel highlights Co-authored-by: Michael Davis <[email protected]> * languages: update spicedb --------- Co-authored-by: Michael Davis <[email protected]>
* languages: add CEL language and grammar * languages: add spicedb schema language * chore: docgen * runtime/queries: refine spicedb & cel highlights Co-authored-by: Michael Davis <[email protected]> * languages: update spicedb --------- Co-authored-by: Michael Davis <[email protected]>
CEL (Common Expression Language) is a non-Turing-Complete language created at Google for embedding into programs. It's used in a variety of projects such as Kubernetes and SpiceDB.
SpiceDB is a popular, open source authorization system inspired by the system internal at Google, Zanzibar.
This PR adds language/grammar support for both of these projects.
I'm not sure the CEL highlighting is working -- I might need some help with writing custom queries for it. The SpiceDB grammar includes queries that target Helix.